<?php global $curUser; ?>
<div id="header-inner" class="group">
    <div id="logo">
        <a href="<?php echo $this->baseUrl ?>">
            <img alt="dribbble" src="<?php echo $this->baseUrl ?>Images/ySocial.gif"/>
        </a>
    </div>
    <a href="<?php echo $this->baseUrl ?>#nav" id="toggle-nav">Toggle navigation</a>
    <ul id="nav">
        <li id="t-search" style="width: 230px;">
            <form id="search" action="<?php echo $this->baseUrl ?>Search">
                <input class="search-text" style="width: 100%;" type="text" name="q" placeholder="Search " value>
            </form>
        </li>
        <?php if (!$_SESSION['userid']) : ?>
            <li id="t-signin"><a href="<?php echo $this->baseUrl ?>Login">Sign in</a></li>
            <?php else : ?>
            <li id="t-profile">
                <a href="<?php echo $this->baseUrl; echo $curUser->username; ?>" class="has-sub">
                    <img alt="Avatar-default" height="16" src="<?php if($curUser->avatarid == 0) echo $this->baseUrl."Images/avatar-default.gif"; else { $photo = Photo::withId($curUser->avatarid); echo $this->baseUrl.$photo->url; }?>" width="16">
                    <span class="profile-name"><?php echo $curUser->firstname." ".$curUser->lastname; ?></span>
                </a>
                <ul class="tabs">
                    <li><a href="<?php echo $this->baseUrl; echo $curUser->username; ?>" class="url" rel="contact"><?php echo $curUser->firstname." ".$curUser->lastname; ?></a></li>
                    <li class="separate"><a href="<?php echo $this->baseUrl; ?>Account">Account Settings</a></li>
                    <li><a href="<?php echo $this->baseUrl; ?>Signout" data-method="delete" rel="nofollow">Sign Out</a></li>
                </ul>
            </li>
        <?php endif; ?>
        <li id="t-shots">
            <a href="<?php echo $this->baseUrl ?>Shots" class="has-sub">Shots</a>
            <ul class="tabs">
                <li class="active">
                    <a href="<?php echo $this->baseUrl ?>Shots/Popular">Popular</a>
                </li>
                <li class>
                    <a href="<?php echo $this->baseUrl ?>Shots/Everyone">Everyone</a>
                </li>
                <li class>
                    <a href="<?php echo $this->baseUrl ?>Shots/Debuts">Debuts</a>
                </li>
            </ul>
        </li>
        <li id="t-explore">
            <a href="<?php echo $this->baseUrl ?>Explore" class="has-sub">Explore</a>
            <ul class="tabs">
                <li>
                    <a href="<?php echo $this->baseUrl ?>Explore/Highlights">Highlights</a>
                </li>
                <li>
                    <a href="<?php echo $this->baseUrl ?>Explore/Colors">Colors</a>
                </li>
            </ul>
        </li>
        <li id="t-about"><a href="<?php echo $this->baseUrl ?>About">About</a></li>
        <?php if (!$_SESSION['userid']) : ?>
            <li id="t-signup">
                <a href="<?php echo $this->baseUrl ?>Signup">
                    <span>Sign up</span>
                </a>
            </li>
        <?php endif; ?>
    </ul>
</div>